/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package kodi.model.UserRights;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import kodi.model.UserRights.Components.SubModuleId;

@Entity
public class SubModule {
    @EmbeddedId
    @AttributeOverride(name="submodule_id", column=@Column(name="submodule_id"))
    private SubModuleId id;
    private String submodule_name;
    @ManyToOne
    private Modules module;
    //private List<Task> tasks;
    @OneToMany(mappedBy = "submodules")
    private Set<Task> tasks = new HashSet();
    
    public SubModuleId getId() {
        return id;
    }

    public void setId(SubModuleId id) {
        this.id = id;
    }

    public String getSubmodule_name() {
        return submodule_name;
    }

    public void setSubmodule_name(String submodule_name) {
        this.submodule_name = submodule_name;
    }

    /**
     * @return the module
     */
    public Modules getModule() {
        return module;
    }

    /**
     * @param module the module to set
     */
    public void setModule(Modules module) {
        this.module = module;
    }

    /**
     * @return the tasks
     */
    public Set<Task> getTasks() {
        return tasks;
    }

    /**
     * @param tasks the tasks to set
     */
    public void setTasks(Set<Task> tasks) {
        this.tasks = tasks;
    }
   
}
